﻿using Microsoft.EntityFrameworkCore;
using Sgr.Data;
using Sgr.EntityFrameworkCore;
using Sgr.EventBus.RelayBoxs.Infrastructure.EntityConfigurations;

namespace Sgr.EventBus.RelayBoxs.Infrastructure
{
    public class OutboxMessageEntityFrameworkTypeProvider : IEntityFrameworkTypeProvider
    {
        public string Name => "SGR";

        public void RegisterEntities(ModelBuilder modelBuilder, DatabaseType? databaseType)
        {
            modelBuilder.ApplyConfiguration(new OutboxMessageConfiguration(databaseType));
        }
    }
}